import { ApiProperty } from '@nestjs/swagger';
import { IsArray, IsNotEmpty, IsUUID } from 'class-validator';

/**
 * 添加任务标签DTO
 */
export class AddTaskTagsDto {
  @ApiProperty({
    description: '任务ID',
    example: 'd290f1ee-6c54-4b01-90e6-d701748f0851',
  })
  @IsNotEmpty({ message: '任务ID不能为空' })
  @IsUUID('4', { message: '任务ID必须是有效的UUID' })
  taskId: string;

  @ApiProperty({
    description: '标签ID数组',
    example: ['d290f1ee-6c54-4b01-90e6-d701748f0851', 'c290f1ee-6c54-4b01-90e6-d701748f0852'],
    type: [String],
  })
  @IsArray({ message: '标签ID必须是数组' })
  @IsUUID('4', { each: true, message: '每个标签ID必须是有效的UUID' })
  tagIds: string[];
}

/**
 * 移除任务标签DTO
 */
export class RemoveTaskTagDto {
  @ApiProperty({
    description: '任务ID',
    example: 'd290f1ee-6c54-4b01-90e6-d701748f0851',
  })
  @IsNotEmpty({ message: '任务ID不能为空' })
  @IsUUID('4', { message: '任务ID必须是有效的UUID' })
  taskId: string;

  @ApiProperty({
    description: '标签ID',
    example: 'd290f1ee-6c54-4b01-90e6-d701748f0851',
  })
  @IsNotEmpty({ message: '标签ID不能为空' })
  @IsUUID('4', { message: '标签ID必须是有效的UUID' })
  tagId: string;
} 